<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<title>
	<?php if(!empty($pagetitle)): echo ($pagetitle); endif; ?>
</title>
<script type="text/javascript" src="__ROOT__/public/jsLib/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="__ROOT__/public/jsLib/jquery.cookies.2.2.0.min.js"></script>
<script type="text/javascript" src="__ROOT__/asset/js/main.js"></script>
<script type="text/javascript" src="__ROOT__/asset/js/checkfield.js"></script>
<link rel="stylesheet" type="text/css" href="__ROOT__/public/jsLib/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="__ROOT__/public/jsLib/bootstrap/google-code-prettify/prettify.css" />
<link rel="stylesheet" type="text/css" href="__ROOT__/asset/main.css" />
<script type="text/javascript" src="__ROOT__/public/jsLib/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="__ROOT__/public/jsLib/bootstrap/google-code-prettify/prettify.js"></script>
<script type="text/javascript">
	var APP = "__APP__";
	var cookie_prefix = '<?php echo ($cookie_prefix); ?>';
	var app_path = $.cookies.get(cookie_prefix+'config_path');
	var dir = $.cookies.get(cookie_prefix+'base_dir');
	var app_name = $.cookies.get(cookie_prefix+'app_name');
	var version = $.cookies.get(cookie_prefix+'version');
	var app_url=$.cookies.get(cookie_prefix+'app_url');
	$(function () {
		//首页的tooltip绑定
		$('.leftbar>li').tooltip({placement:'right'});
		prettyPrint()
	});
</script>
	<style type="text/css">
		.error_list {
			list-style: none;

		}
	</style>
</head>
<body>
<div class="navbar navbar-fixed-top navbar-inverse">
	<div class="navbar-inner">
		<div class="container">
			<a class="brand" href="__APP__" data-original-title="返回TP助手首页">ThinkPHP助手</a>
			<ul class="nav">
				<li class="divider-vertical"></li>

				<li><a href="" class="app_name" data-original-title="访问项目首页" style="color: #ffffff;font-weight: bold;" target="_blank"></a></li>
			</ul>

			<form class="pull-right" id="docform" action="" method="post" enctype="application/x-www-form-urlencoded" target="_blank">
				<div class="input-prepend input-append">
					<select name="docname" id="docname" class="" onchange="getAction()">
						<option value="php">php</option>
						<option value="jquery">jQuery</option>
						<option value="thinkphp">ThinkPHP</option>
					</select>
					<input name="pattern" class="span2" id="appendedInputButtons" type="text" onchange="getAction()" placeholder="输入函数名或关键词">
					<input type="hidden" name="keywords" value="">
					<input type="hidden" name="show" value="quickref">
					<input type="hidden" name="lang" value="zh">
					<button class="btn" type="submit">搜索</button>
				</div>
			</form>

		</div>
	</div>
</div>

<div class="top-alert alert-error affix" style="display: none;">
	<div class="container ">
		<button class="close" style="margin-top: 4px;">&times;</button>
		<div class="alert alert-error alert-noborder alert-content" style="">
			表单填写有误,请检查红色提示表单项.
		</div>
	</div>
</div>

<script type="text/javascript">
	$('.navbar .app_name').text("当前项目：" + app_name);
	$('.navbar .app_name').attr('href', app_url);
	$('.navbar a').tooltip({placement:'bottom'});
	var search = {
		php     :"http://cn2.php.net/search.php",
		jquery  :'http://api.jquery.com/?ns0=1&s=keywords',
		thinkphp:'http://doc.thinkphp.cn/manual/_search.html'
	}
	function getAction() {
		var keyword = $("input[name='pattern']").val();
		var url = search[$('#docname').val()].replace(/keywords/, keyword);
		$('#docform').attr('action', url);
		$("input[name='keywords']").val(keyword)
	}
	getAction();
</script>
<div class="container content">
	<div class="row">
		<div class="span12" style="padding-top: 100px;">
			<div class="alert alert-error"  >
				<div style="font-size: 40px;line-height: 60px;">
					<?php echo ($error); ?>
				</div>
				<?php if(!empty($error_list)): ?>好好检查一下吧：
					<ul class="error_list">
						<?php if(is_array($error_list)): foreach($error_list as $key=>$error_msg): ?><li><?php echo ($error_msg); ?></li><?php endforeach; endif; ?>
					</ul><?php endif; ?>
			</div>
		</div>
	</div>
</div>
<?php echo ($footer); ?>
</body>
</html>